<extend name="template/base_index" />

<block name="area_header">
    <link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
    <style>.pink{color:pink;}</style>
    <link type="text/css" rel="stylesheet" href="__CDN__/select2/4.0.0/css/select2.min.css" />
    <link type="text/css" rel="stylesheet" href="__CDN__/select2/4.0.0/css/cosmo-skin.css" />
    <script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
</block>

<block name="area_body">
    {:W('Menus/topbar')}
    <div class="admin-main container-fluid">
        {:W('Menus/left')}
        <div class="admin-main-content">
            {:W('Menus/breadcrumb')}
            <!-- 过滤\查询按钮 -->
            <div class="filter-controls">
                {:W('OrgArea/area')}
                <!-- 日期查询 -->
                <form action="{:U('Admin/IntentionalOrder/index')}" method="post" class="searchForm form-inline">
                    <div class="form-group col-lg-12 col-md-12">
                        <div class="input-group">
                            <div class="input-group-addon input-sm">
                                时间
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" name="startdatetime" id="startdatetime" class="form-control input-short input-sm" value="{$startdatetime}" />
                            <div class="input-group-addon input-sm">
                                <i class="fa fa-long-arrow-right"></i>
                            </div>
                            <input type="text" name="enddatetime" id="enddatetime" class="form-control input-short input-sm" value="{$enddatetime}" />
                        </div>
                        <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
                    </div>
                </form>
            </div>
            <!-- 操作按钮 -->
            <div class="btn-controls">
            </div>
            <table class="table table-striped table table-hover  table-condensed">
                <thead>
                <tr>
                    <th>
                        <input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />
                    </th>
                    <th>
                        订单编号
                    </th>
                    <th>
                        下单用户
                    </th>
                    <th>
                        下单时间
                    </th>
                    <th>
                        联系号码
                    </th>
                    <th>
                        备注
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
                </thead>
                <tbody>
                <empty name="list">
                    <tr>
                        <td colspan="10" class="text-center">{:L('NO_DATA')}</td>
                    </tr>
                    <else/>
                    <volist name="list" id="vo">
                        <tr>
                            <td>
                                <input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" />
                            </td>
                            <td>
                                <a href="{:U('Admin/Orders/view',array('id'=>$vo['id']))}">{$vo.id}</a>
                            </td>

                            <td>
                                <a href="{:U('Admin/CustomerInfo/index',array('id'=>$vo['uid']))}">{$vo.nickname}</a>
                            </td>

                            <td>
                                {$vo.create_time|date="Y-m-d H:i:s",###}
                            </td>
                            <td>
                                {$vo.contact_name}
                            </td>
                            <td>
                                {$vo.note}
                            </td>
                            <td>
                                <a href="{:U('Admin/IntentionalOrder/detail',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-save"></i>查看详情</a>
                                <a href="{:U('Admin/IntentionalOrder/del',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-save"></i>删除</a>
                            </td>
                        </tr>
                    </volist>
                </empty>
                </tbody>
            </table>
            <div>{$show}</div>



        </div>
        <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
</block>

<block name="area_footer">
    <script type="text/javascript">
        $(function() {
            $('#startdatetime').datetimepicker({
                lang: 'ch',
                format:'Y-m-d H:i:s',
                // format:'Y-m-d',
                // timepicker:false,
            });
            $('#enddatetime').datetimepicker({
                lang: 'ch',
                format:'Y-m-d H:i:s',
            });
        });
    </script>
</block>